const express = require("express");
const router = express.Router();
const { transDetails, basicTradingData } = require("../../data/mockData.js");

// 查询交易页面数据
router.get("/data/basic/trading", (req, res) => {
  //   console.log(req.query, "req");
  res.success({ data: basicTradingData });
});

// 查询交易表格数据
router.get("/spotCurrentCommission", (req, res) => {
  //   console.log(req.query, "req");
  res.success({ data: transDetails });
});

// 交易
router.post("/buy/sell/spot", (req, res) => {
  console.log(req.body, "交易请求数据");

  // 模拟交易逻辑
  res.success({ message: "交易成功" });
});

router.post("/buy/one/further", (req, res) => {
  console.log(req.body, "交易请求数据");

  // 模拟交易逻辑
  res.success({ message: "新接口调用成功" });
});

module.exports = router;
